package com.example.redisstudy1.service;


import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;

import javax.annotation.Resource;
import java.util.concurrent.CountDownLatch;

@SpringBootTest
public class pubsubTest1 {

    @Resource
    private RedisTemplate<String,Object> redisTemplate;

    @Test
    void pub1()  {
            redisTemplate.convertAndSend("test2","hello world");
    }
}
